home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / PAS_0493 / VGADETCT.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-22  |  1KB  |  36 lines

  1. {─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
  2. Msg  : 259 of 534
  3. From : Sean Palmer                         1:104/123.0          19 Apr 93  16:29
  4. To   : Aaron Marasco
  5. Subj : VGA Detection
  6. ────────────────────────────────────────────────────────────────────────────────
  7.  AM> I know how to determine the current mode of a card, but how
  8.  AM> do a lot of  programs determine if a VGA is present in the
  9.  AM> first place? I'd really  appreciate some code if possible.
  10.  AM> Oh, and does anyone know about custom  character fonts for
  11.  AM> EGA? Is it possible? If so, could someone also pass  along
  12.  AM> the code for EGA detection? Thanks!
  13.  
  14. Font-changing is possible, but you seem to have just missed a lot of
  15. font-changing routines on here...
  16.  
  17. Well, here are routines to detect a VGA and an EGA adapter...}
  18.  
  19. function EGAInstalled:boolean;assembler;asm
  20.  mov ax,$1200; mov bx,$10; mov cx,$FFFF; int $10;
  21.  inc cx; mov al,cl; or al,ch;
  22.  end;
  23.                                               
  24. function vgaPresent:boolean;assembler;asm
  25.  mov ah,$F; int $10; mov oldMode,al;  {save old Gr mode}
  26.  mov ax,$1A00; int $10;    {check for VGA/MCGA}
  27.  cmp al,$1A; jne @ERR;     {no VGA Bios}
  28.  cmp bl,7; jb @ERR;        {is VGA or better?}
  29.  cmp bl,$FF; jnz @OK;
  30. @ERR: xor al,al; jmp @EXIT;
  31. @OK: mov al,1;
  32. @EXIT:
  33.  end;
  34.  _
  35. / _
  36. \_/host